#!/bin/bash

set -e

DB_HOST=${DB_HOST:-192.168.80.148}
DB_USER=${DB_USER:-admin}
DB_PASS=${DB_PASS:-admin}
DB_POINT=${DB_POINT:-3307}

#if ! mysql -u${DB_USER} -p${DB_PASS} -h ${DB_HOST}  -P${DB_POINT} -e "show databases;" | grep -w xc; then
#  mysql -u${DB_USER} -p${DB_PASS} -h ${DB_HOST} -P${DB_POINT} -e "create database if not exists xc;"
#  mysql -u${DB_USER} -p${DB_PASS} -h ${DB_HOST} -P${DB_POINT} xc -e "create table if not exists user(id int(4),name char(20));"
#  mysql -u${DB_USER} -p${DB_PASS} -h ${DB_HOST} -P${DB_POINT} xc -e "insert into user(id,name) values('1','fu');"
#fi


#成功返回值
#echo $?

exec "$@"